sequenceDiagram
  Providers ->>+ LSIF provider: DefinitionsAndHover(textDocument, position)

  par
    LSIF provider ->>+ GraphQL API: LSIF.Ranges(position +/- W)
    GraphQL API  -->>- LSIF provider: ranges
  and
    LSIF provider ->>+ GraphQL API: LSIF.DefinitionAndHover(position)
    GraphQL API  -->>- LSIF provider: {definitions, hover text}
  end

  LSIF provider -->>- Providers: {definitions, hover text}

  alt if no definitions
    Providers       ->>+ Search provider: Definitions(textDocument, position)
    Search provider ->>+ GraphQL API: Symbol Search "repo:^repo$@commit"
    GraphQL API    -->>- Search provider: definitions

    alt if no definitions
      Search provider ->>+ GraphQL API: Symbol Search "-repo:^repo$"
      GraphQL API    -->>- Search provider: definitions
    end

    Search provider -->>- Providers: definitions
  end
